//
//  Kylin_PublishButton.m
//  03-BuDeJie-2 TabBar设置
//
//  Created by Kylin on 16/2/20.
//  Copyright © 2016年 kylin. All rights reserved.
//

#import "Kylin_PublishButton.h"

@implementation Kylin_PublishButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.font = [UIFont systemFontOfSize:15];
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    }
    return self;
}


- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    self.imageView.y = 0;
    self.imageView.centerX = self.width * 0.5;
    
    self.titleLabel.width = self.width;
    self.titleLabel.y = CGRectGetMaxY(self.imageView.frame);
    self.titleLabel.x = 0;
    self.titleLabel.height = self.height - self.imageView.height;
}
@end
